<template>
    <div>
        <div class="homeCompent" style="padding:120px 50px">
            <router-link to="/selfPage">
                <div class="personLink"><p>点击进入日常评价</p></div>
            </router-link>                
            <div @click="personCompent">
                <div v-if="seePersonResult == true" class="personResult"><p>点击查看日常评价结果</p></div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
  name: "selfIndex",
  data() {
    return {
        seePersonResult: false, //是否可以看日常结果权限
    };
  },
  created() {
    this.filterInfo();
  },
  methods: {
    //跳转评价页
    personCompent() {
      this.$router.push("/departenList");
    },
    //是否显示评价按钮 和 查看评价结果权限接口
    filterInfo() {
        const url = `api/evaluate/filterInfo`
        this.axios(url).then(response => {
            this.seePersonResult = response.data.canSeePersonalResult
            // console.log("是否可以看日常结果权限",response.data.canSeePersonalResult);
        })
    } 
  }
};
</script>
